<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- <script src="https://unpkg.com/dayjs@1.8.21/dayjs.min.js"></script> -->
    <script src="./js/package/dayjs.min.js"></script>


    <script src="./js/variables.js"></script>

    <script src="./js/package/vue.min.js"></script>
    <!-- <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.min.js"
        integrity="sha256-kXTEJcRFN330VirZFl6gj9+UM6gIKW195fYZeR3xDhc=" crossorigin="anonymous"></script> -->
    <link rel="stylesheet" href="./css/maze-editor.css" />

</head>

<body>
    <div id="app">
        <div id="controls" class="mazify-editor">
            <div class="description">
                <span class="des-item">1、起点个数必须为1，终点个数必须大于0</span>
                <span class="des-item">2、建议将最外围都设置成墙，防止用户从地图坠落</span>
                <span class="des-item">3、后续版本考虑将彩蛋放在围墙范围外</span>
            </div>
            <div v-for="item in mapTable" class="line">
                <div class="left">
                    <div type='button' :class="['btn', 'btn-'+item.type,item.type===selectedType?'btn-active':'' ]"
                        @click="selectedType=item.type"></div>
                    <span>{{item.type}}——{{item.label}}</span>
                </div>
                <span class="middle">{{item.description}}</span>
            </div>
            <div class="panel">
                <button class="btn btn-teal" @click="save">保存</button>
                <button class="btn btn-teal" @click="gotoMaze">进入迷宫</button>
            </div>
           
        </div>
        <div id="container">
            <div v-for="(arrItem,arrItemIndex) in mazeData" :id="arrItemIndex" :key="arrItemIndex" class="row">
                <div v-for="(colItem,colIndex) in arrItem" :id="1+colIndex+4*arrItemIndex" :key="colIndex"
                    :class="['tile', 'tile-'+colItem]"  @mousemove="changeTile($event,arrItemIndex,colIndex)"
                    @click="changeTile($event,arrItemIndex,colIndex)"
                    :type="colItem">
                    <span class="toShow">{{mapTable[colItem].value}}</span>
                </div>
            </div>

        </div>
    </div>
    <script src="./js/maze-editor.js"></script>
</body>

</html>